#	$Id: Makefile,v 1.1 2006/03/19 20:14:29 jfb Exp $

.include "../share/mk/own.mk"

SUBDIR+=	mod_cgi
SUBDIR+=	mod_mime
SUBDIR+=	mod_perl


# A target to simplify creation of a new module
newmod:
	@if [ x${MODNAME} = x ]; then					\
		echo "No module name specified in MODNAME";		\
		exit 1;							\
	fi
	@echo "Copying skeleton module"
	@cp -R mod_skel mod_${MODNAME}
	@mv mod_${MODNAME}/mod_skel.c mod_${MODNAME}/mod_${MODNAME}.c
	@mv mod_${MODNAME}/mod_skel.h mod_${MODNAME}/mod_${MODNAME}.h
	@for f in `ls mod_${MODNAME}/*`; do				\
		sed -e 's/mod_skel/mod_${MODNAME}/gi' $$f > $$f.tmp;	\
		mv $$f.tmp $$f;						\
	done

.include "../share/mk/subdir.mk"
